#ifndef TODO_TESTRUNNER_H
#define TODO_TESTRUNNER_H
#include <vector>
#include <dirent.h>
#include <time.h>

class TestRunner {
	unsigned int pass, fail, leak;
	clock_t start_time;
	std::vector<std::string> files;
	std::vector<std::string> tmp_files;
	
	void load_folder(const char* dir);
	std::string extract_folder(const char* file) const;
	void write_log(std::string testname, std::string message);
	unsigned int file_size(std::string file);
public:
	TestRunner() : pass(0), fail(0), leak(0), valgrind(false) { start_time = clock(); }
	~TestRunner();
	void write_file(std::string&, std::string&);
	std::string read_file(const char*) const;
	void show_result(void) const;
	void find(char* dir);
	void run(void);
	
	bool valgrind;
};

#endif // TODO_TESTRUNNER_H 
